﻿Imports System
Imports System.Collections.Generic

Namespace System.Workflow.Runtime.Tracking
    Public Class UserTrackingRecord
        Inherits TrackingRecord
        ' Methods
        Public Sub New()
            Me._body = New List([Of] TrackingDataItem)
            Me._contextGuid = Guid.Empty
            Me._parentContextGuid = Guid.Empty
            Me._eventDateTime = DateTime.MinValue
            Me._eventOrder = -1
            Me._annotations = New TrackingAnnotationCollection
        End Sub

        Public Sub New(ByVal activityType As Type, ByVal qualifiedName As String, ByVal contextGuid As Guid, ByVal parentContextGuid As Guid, ByVal eventDateTime As DateTime, ByVal eventOrder As Integer, ByVal userDataKey As String, ByVal userData As Object)
            Me._body = New List([Of] TrackingDataItem)
            Me._contextGuid = Guid.Empty
            Me._parentContextGuid = Guid.Empty
            Me._eventDateTime = DateTime.MinValue
            Me._eventOrder = -1
            Me._annotations = New TrackingAnnotationCollection
            Me._activityType = activityType
            Me._qualifiedID = qualifiedName
            Me._eventDateTime = eventDateTime
            Me._contextGuid = contextGuid
            Me._parentContextGuid = parentContextGuid
            Me._eventOrder = eventOrder
            Me._userData = userData
            Me._key = userDataKey
        End Sub


        ' Properties
        Public Property ActivityType As Type
            Get
                Return Me._activityType
            End Get
            Set(ByVal value As Type)
                Me._activityType = value
            End Set
        End Property

        Public Overrides ReadOnly Property Annotations As TrackingAnnotationCollection
            Get
                Return Me._annotations
            End Get
        End Property

        Public ReadOnly Property Body As IList([Of] TrackingDataItem)
            Get
                Return Me._body
            End Get
        End Property

        Public Property ContextGuid As Guid
            Get
                Return Me._contextGuid
            End Get
            Set(ByVal value As Guid)
                Me._contextGuid = value
            End Set
        End Property

        Public Overrides Property EventArgs As EventArgs
            Get
                Return Me._args
            End Get
            Set(ByVal value As EventArgs)
                Me._args = value
            End Set
        End Property

        Public Overrides Property EventDateTime As DateTime
            Get
                Return Me._eventDateTime
            End Get
            Set(ByVal value As DateTime)
                Me._eventDateTime = value
            End Set
        End Property

        Public Overrides Property EventOrder As Integer
            Get
                Return Me._eventOrder
            End Get
            Set(ByVal value As Integer)
                Me._eventOrder = value
            End Set
        End Property

        Public Property ParentContextGuid As Guid
            Get
                Return Me._parentContextGuid
            End Get
            Set(ByVal value As Guid)
                Me._parentContextGuid = value
            End Set
        End Property

        Public Property QualifiedName As String
            Get
                Return Me._qualifiedID
            End Get
            Set(ByVal value As String)
                Me._qualifiedID = value
            End Set
        End Property

        Public Property UserData As Object
            Get
                Return Me._userData
            End Get
            Set(ByVal value As Object)
                Me._userData = value
            End Set
        End Property

        Public Property UserDataKey As String
            Get
                Return Me._key
            End Get
            Set(ByVal value As String)
                Me._key = value
            End Set
        End Property


        ' Fields
        Private _activityType As Type
        Private _annotations As TrackingAnnotationCollection
        Private _args As EventArgs
        Private _body As List([Of] TrackingDataItem)
        Private _contextGuid As Guid
        Private _eventDateTime As DateTime
        Private _eventOrder As Integer
        Private _key As String
        Private _parentContextGuid As Guid
        Private _qualifiedID As String
        Private _userData As Object
    End Class
End Namespace

